This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# References: | |
# 1. https://blog.logrocket.com/build-component-library-react-typescript/ | |
# 2. https://parceljs.org/recipes/react/ | |
react-parcel () { | |
# Create folder | |
mkdir "$1" && cd "$_" | |
# Initialize package.json and git local repo | |
npm init -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_minimum_time_to_prepare(t, a, b): | |
# Validar os parametros ne familia | |
if t < 0 or a < 0 or b < 0: | |
raise ValueError('tempo negativo amigo?') | |
if t > a and t > b: | |
raise ValueError('t tem que ser menor que a ou b.') | |
# Se alguma das ampulhetas for exatamente o tempo que ele precisa retorna direto | |
if t == a: | |
return a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkInterrupter() { | |
if ($(".interrupter-actions") && $(".interrupter-actions").children.length > 0) { | |
$(".interrupter-actions").children[0].click() | |
} | |
} | |
function checkSkipIntro() { | |
if ($(".skip-credits") && $(".skip-credits").children.length > 0) { | |
$(".skip-credits").children[0].click() | |
} |